package ru.smc.hogwarts.classes;

import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;

public class EMF {
	private static EMF instance;
	private EntityManagerFactory emf;
	
	private EMF() {
		emf = Persistence.createEntityManagerFactory("hogwarts");
	}
	
	public static EMF getInstance() {
		if (instance == null)
			instance = new EMF();
		return instance;
	}
	
	public EntityManagerFactory getEMF() {
		return emf;
	}

}